package com.terrynoya.fight.stateMachine.triggers
{
	import com.terrynoya.fight.char.Character;
	import com.terrynoya.fight.emuns.StateTypeEnum;
	import com.terrynoya.fight.evaluation.Node;
	import com.terrynoya.fight.evaluation.ParseState;

	public class P2StateNo
	{
		public function P2StateNo()
		{
		}
		
		public static function eval(data:Object,node:Node):*
		{
			var chara:Character = Character(data);
			var opponent:Character = chara.getOpponent();
			if(opponent == null)
			{
				return StateTypeEnum.NONE;
			}
			return opponent.state;
		}
		
		public static function parse(state:ParseState):Node
		{
			return state.baseNode;
		}
	}
}